{{ $isHome        := .IsHome }}
{{ $isDoc         := eq .Section "docs" }}
{{ $title         := .Title }}
{{ $description   := .Param "description" }}
{{ $pageType      := cond $isHome "website" "article" }}
{{ $imageUrl      := site.Params.logo }}
{{ $twitterHandle := site.Params.social.twitter.handle }}
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
{{ hugo.Generator }}

{{- with $description }}
<meta name="description" content="{{ . }}" />
{{- end }}

<!-- OpenGraph metadata-->
<meta property="og:title" content="{{ $title }}">
{{- if $isDoc }}
<meta property="og:type" content="documentation">
{{- end }}
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:locale" content="en_US">
{{- if not $isHome }}
<meta property="og:site_name" content="{{ site.Title }}">
{{- end }}
{{- with $description }}
<meta property="og:description" content="{{ . }}">
{{- end }}
<meta name="og:type" content="{{ $pageType }}">
<meta name="og:image" content="{{ $imageUrl }}">
<meta name="og:image:alt" content="{{ site.Title }} project logo">
<meta name="og:image:type" content="image/gif">


<!-- Twitter Card metadata -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@{{ $twitterHandle }}">
<meta name="twitter:creator" content="@{{ $twitterHandle }}">

<link rel="canonical" content="{{ .Permalink }}">

<!-- Favicons -->
<!-- generics -->
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<!-- macOS -->
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<!-- Android -->
<link rel="manifest" href="/site.webmanifest">
<!-- iOS -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<!-- Windows -->
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
<meta name="theme-color" content="#9c3838">
